package com.sys.orders.pojo;

import java.util.Date;
import java.util.Map;
import java.util.TreeMap;

import com.sys.common.pojo.BasePojo;
import com.sys.goods.pojo.ABlindbox;

/**
 * 评论表
 * 
 * @author lby
 *
 */
public class AOrdersComment extends BasePojo<AOrdersComment>
{
	private int commentId ; 
	private int userId;
	private int orderID;
	private String commentContent;
	private Date commentTime;
	private int stars;
	private byte status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;

	private String statusStr;
	/* 关联关系 */
	private ABlindbox blindbox ; 

	/*
	 * 方便枚举项在网页上显示出来 键为值(数字), 值为字符串描述 只提供get方法
	 */
	private Map<String, String> enumsMap = new TreeMap<String, String>();

	public Map<String, String> getEnumsMap()
	{
		// 根据状态值获取字符串描述
		AOrdersCommentEnum[] aorderscommentenum = AOrdersCommentEnum.values();
		for (int i = 0; i < aorderscommentenum.length; i++)
		{
			AOrdersCommentEnum agoodsEnum = aorderscommentenum[i];
			String key = agoodsEnum.toString();
			enumsMap.put(key + "-" + agoodsEnum.getStatus() + "", agoodsEnum.getName());
		}
		return enumsMap;
	}

	public String getStatusStr()
	{
		AOrdersCommentEnum[] values = AOrdersCommentEnum.values();
		for (int i = 0; i < values.length; i++)
		{
			AOrdersCommentEnum aorderscommentEnumTemp = values[i];
			if (aorderscommentEnumTemp.toString().startsWith("STATUS"))
			{
				if (aorderscommentEnumTemp.getStatus() == this.status)
				{
					this.statusStr = aorderscommentEnumTemp.getName();
				}
			}
		}

		return statusStr;
	}

	public int getOrderID()
	{
		return orderID;
	}

	public void setOrderID(int orderID)
	{
		this.orderID = orderID;
	}

	public String getCommentContent()
	{
		return commentContent;
	}

	public void setCommentContent(String commentContent)
	{
		this.commentContent = commentContent;
	}

	public Date getCommentTime()
	{
		return commentTime;
	}

	public void setCommentTime(Date commentTime)
	{
		this.commentTime = commentTime;
	}

	public int getStars()
	{
		return stars;
	}

	public void setStars(int stars)
	{
		this.stars = stars;
	}

	public byte getStatus()
	{
		return status;
	}

	public void setStatus(byte status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}

	public int getCommentId() {
		return commentId;
	}

	public void setCommentId(int commentId) {
		this.commentId = commentId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public ABlindbox getBlindbox() {
		return blindbox;
	}

	public void setBlindbox(ABlindbox blindbox) {
		this.blindbox = blindbox;
	}

}
